#FROM openjdk:8-jre-alpine
FROM java:8-jre-alpine
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk add --update ttf-dejavu fontconfig && rm -rf /var/cache/apk/*
ADD *.jar /home/micro-auth.jar
ENV JAVA_OPTS_DEF="-server -Djava.net.preferIPv4Stack=true"
ENV JAVA_OPTS="-Xmx1g -Xms1g"
ENV APP_ARGS=""
#定义时区参数
ENV TZ=Asia/Shanghai
#设置时区
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone
#设置编码
ENV LANG C.UTF-8
ENTRYPOINT java ${JAVA_OPTS_DEF} ${JAVA_OPTS} ${APP_ARGS} -Djava.security.egd=file:/dev/./urandom -Dreactor.netty.pool.leasingStrategy=lifo -jar /home/micro-auth.jar